<template>
	<div style="width: 90vh;">
		<h2>登分管理-课程选择</h2>
		<hr/>
		<table border="1px" style="width: 90vh;">
			<tr>
				<th>班级编号</th>
				<th>班级名称</th>
				<th>课程编号</th>
				<th>课程名称</th>
				<th>请选择</th>
			</tr>
			<tr v-for="x in data.tasks">
				<th>{{x.clz.clzno}}</th>
				<th>{{x.clz.clzname}}</th>
				<th>{{x.course.cno}}</th>
				<th>{{x.course.cname}}</th>
				<th><button @click="gomark(x.clz.clzno,x.course.cno)">改班级进行登分或修改</button></th>
			</tr>
		</table>
	</div>
</template>

<script setup>
		import {ref, reactive,onMounted,computed} from"vue"
		import {$get,$postx,$postj,$postf} from '../../ajax/index.js'
		// import alert from '../../utils/doalert.js'
		import router from '../../../router/index.js'
	const data=reactive({
		tasks:[]
	})
onMounted(()=>{
		$get("/api/fore/tea/findMyTask").then((reap)=>{
			data.tasks=reap.data.data
			console.log(reap.data.data)
		})
	})
	function gomark(clzno,cno){
		console.log("去登分")
		router.push({
			path:'/tea/domark',query:{
				clzno:clzno,
				cno:cno
			}
			
		})
		
	}
</script>